package com.le.tester.javaThink.fifth.chapter13_FuncProgramming;

import java.util.function.IntSupplier;

/**
 * createTime：2021/8/6 15:54
 * description：闭包的内部类
 */
public class AnonymousClosure {
    IntSupplier makeFun(int x) {
        int i = 0;
        return new IntSupplier() {
            @Override
            public int getAsInt() {
                return x + i;
            }
        };
    }
}
